package com.itheima.dao.impl;

import com.itheima.dao.RecordDao;
import com.itheima.pojo.Record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author Administrator
 * @TIME 2020/7/9 2:03
 * @description
 */
@Repository
public class RecordDaoImpl implements RecordDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Override
    public void save(Record record) {
        String sql="insert into record values(null,?,?,?,?)";
        jdbcTemplate.update(sql,record.getFrom(),record.getTo(),record.getMoney(),record.getTime());
    }
}
